{{switch $t.view_type}}
    {{case images}}
        {{if !empty($form_table_data_detail[$t['view_key']])}}
            <img src="{{$form_table_data_detail[$t['view_key']]}}" class="am-img-thumbnail {{if !empty($t['images_shape'])}}am-{{$t.images_shape}}{{/if}}" style="{{if !empty($t['images_width'])}}width:{{$t.images_width}}px;{{/if}}{{if !empty($t['images_height'])}}height:{{$t.images_height}}px;{{/if}}" />
        {{/if}}
    {{/case}}
    {{case field}}
        <p class="
            {{if isset($t['is_badge']) and $t['is_badge'] eq 1}}
                am-badge {{if !empty($t['badge_key']) and !empty($t['badge_style']) and isset($form_table_data_detail[$t['badge_key']]) and isset($t['badge_style'][$form_table_data_detail[$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_detail[$t['badge_key']]], 0, 1) neq '#'}}am-badge-{{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}} {{/if}} 
                {{if !empty($t['badge_shape'])}}am-{{$t.badge_shape}} {{/if}} 
            {{/if}} 
            {{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and isset($form_table_data_detail[$t['color_key']]) and isset($t['color_style'][$form_table_data_detail[$t['color_key']]]) and substr($t['color_style'][$form_table_data_detail[$t['color_key']]], 0, 1) neq '#'}}am-text-{{$t['color_style'][$form_table_data_detail[$t['color_key']]]}}{{/if}} 
            {{if !empty($t['text_truncate'])}}am-text-truncate{{if $t['text_truncate'] eq 2}}-2{{/if}}{{/if}}" 
            style="
            {{if isset($t['is_badge']) and $t['is_badge'] eq 1 and !empty($t['badge_key']) and !empty($t['badge_style']) and is_array($t['badge_style']) and isset($form_table_data_detail[$t['badge_key']]) and isset($t['badge_style'][$form_table_data_detail[$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_detail[$t['badge_key']]], 0, 1) eq '#'}}background: {{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}};{{/if}} 
            {{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and is_array($t['color_style']) and isset($form_table_data_detail[$t['color_key']]) and isset($t['color_style'][$form_table_data_detail[$t['color_key']]]) and substr($t['color_style'][$form_table_data_detail[$t['color_key']]], 0, 1) eq '#'}}color: {{$t['color_style'][$form_table_data_detail[$t['color_key']]]}};{{/if}}" 
            {{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_detail[$t['popover_field']])}}data-am-popover="{content: '{{:PopoverContentHandle($form_table_data_detail[$t['popover_field']])}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
        >
            <!-- 图标+提示 -->
            {{if isset($t['is_first_tips']) and $t['is_first_tips'] eq 1 and ((!empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])) or (!empty($t['first_tips_data'])))}}
                <a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])}}{{:PopoverContentHandle($form_table_data_detail[$t['first_tips_key']])}}{{else /}}{{:PopoverContentHandle($t.first_tips_data)}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
            {{/if}}

            <!-- 连接+提示 -->
            {{if isset($t['is_first_link']) and $t['is_first_link'] eq 1 and ((!empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])) or (!empty($t['first_link_data'])))}}
                <a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])}}{{$form_table_data_detail[$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{:PopoverContentHandle($t.first_link_popover)}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
            {{/if}}

            <!-- 圆点 -->
            {{if isset($t['is_round_point']) and $t['is_round_point'] eq 1}}
                <i class="am-icon-circle am-margin-right-xs {{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) neq '#'}}am-text-{{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}}{{/if}}" 
                style="{{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) eq '#'}}color: {{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}};{{/if}}"></i>
            {{/if}}

            <!-- 前后固定拼接的值 前面 -->
            {{if isset($t['view_join_first'])}}
                <span>{{$t.view_join_first}}</span>
            {{/if}}

            <!-- 如果字段为数组则处理多个字段拼接数据 -->
            {{if is_array($t['view_key'])}}
                {{foreach $t['view_key'] as $fk=>$fv}}
                    {{if isset($form_table_data_detail[$fv])}}
                        {{$form_table_data_detail[$fv]}}
                        <!-- 多个字段拼接数据的的拼接字符 -->
                        {{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
                            {{$t.view_key_join|raw}}
                        {{/if}}
                    {{/if}}
                {{/foreach}}
            {{else /}}
                <!-- 是否存在数据 key -->
                {{if isset($form_table_data_detail[$t['view_key']])}}
                    <!-- 是否指定数据转换 -->
                    {{if !empty($t['view_data']) and is_array($t['view_data'])}}
                        <!-- 不存在数组中则不显示 -->
                        {{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]])}}
                            <!-- 是否指定二维数组key取值 -->
                            {{if !empty($t['view_data_key'])}}
                                {{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']])}}
                                    {{$t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']]}}
                                {{/if}}
                            {{else /}}
                                {{$t['view_data'][$form_table_data_detail[$t['view_key']]]}}
                            {{/if}}
                        {{/if}}

                    <!-- 直接展示数据 -->
                    {{else /}}
                        {{$form_table_data_detail[$t['view_key']]|raw}}
                    {{/if}}
                {{/if}}
            {{/if}}
            <!-- 前后固定拼接的值 后面 -->
            {{if isset($t['view_join_last'])}}
                <span>{{$t.view_join_last}}</span>
            {{/if}}
        </p>
    {{/case}}
    {{case module}}
        <!-- 从模块加载自定义模块数据 -->
        {{:ModuleInclude($t['view_key'], $form_table_data_detail, ['form_request_type'=>'detail'])}}
    {{/case}}
    {{case status}}
        <!-- 数据状态操作按钮组件 -->
        {{if !empty($t['key_field']) and !empty($t['post_url'])}}
            <a href="javascript:;"
                class="am-icon-btn am-icon-check submit-state {{if $form_table_data_detail[$t['view_key']] eq 1}}am-success{{else /}}am-default{{/if}}"
                data-url="{{$t.post_url}}"
                data-id="{{if isset($form_table_data_detail[$t['key_field']])}}{{$form_table_data_detail[$t['key_field']]}}{{/if}}"
                data-state="{{$form_table_data_detail[$t['view_key']]}}"
                data-field="{{$t.view_key}}"
                data-is-update-status="{{if isset($t['is_form_su'])}}{{$t.is_form_su}}{{else /}}0{{/if}}"
            ></a>
        {{/if}}
    {{/case}}
{{/switch}}

<!-- 列表格子钩子 -->
{{if !empty($t['unique_key']) and $t['view_type'] neq 'operate'}}
    {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
        <div class="plugins-tag">
            <span>{{$hook_name_form_grid}}_{{$t.unique_key}}</span>
        </div>
    {{/if}}
    {{php}}
        $hook_data = MyEventTrigger($hook_name_form_grid.'_'.$t['unique_key'], [
            'hook_name'     => $hook_name_form_grid.'_'.$t['unique_key'],
            'is_backend'    => true,
            'id'            => isset($form_table_data_detail[$form_table['base']['key_field']]) ? $form_table_data_detail[$form_table['base']['key_field']] : 0,
            'data'          => $form_table_data_detail,
        ]);
        if(!empty($hook_data) && is_array($hook_data))
        {
            foreach($hook_data as $hook)
            {
                if(is_string($hook) || is_int($hook))
                {
                    echo htmlspecialchars_decode($hook);
                }
            }
        }
    {{/php}}
{{/if}}